<!DOCTYPE html>
<html lang="zh-CN">
  <head>
    <meta charset="UTF-8" />
    <link rel="icon" type="image/svg+xml" href="/favicon.ico" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no" />
    <meta name="format-detection" content="telephone=no" />
    <meta name="apple-mobile-web-app-capable" content="yes" />
    <meta name="apple-mobile-web-app-status-bar-style" content="black" />
    <meta name="apple-touch-fullscreen" content="yes" />
    <meta name="theme-color" content="#1989fa" />
    <meta name="description" content="RX在线教育平台移动端 - 随时随地学习，提升自我" />
    <meta name="keywords" content="在线教育,移动学习,课程,考试,RX教育" />
    <meta name="author" content="RX Team" />
    
    <!-- Open Graph / Facebook -->
    <meta property="og:type" content="website" />
    <meta property="og:url" content="https://m.rxbase.com/" />
    <meta property="og:title" content="RX在线教育平台" />
    <meta property="og:description" content="随时随地学习，提升自我" />
    <meta property="og:image" content="/images/og-image.png" />
    
    <!-- Twitter -->
    <meta property="twitter:card" content="summary_large_image" />
    <meta property="twitter:url" content="https://m.rxbase.com/" />
    <meta property="twitter:title" content="RX在线教育平台" />
    <meta property="twitter:description" content="随时随地学习，提升自我" />
    <meta property="twitter:image" content="/images/og-image.png" />
    
    <!-- PWA相关 -->
    <link rel="manifest" href="/manifest.json" />
    <link rel="apple-touch-icon" href="/icons/icon-192x192.png" />
    
    <!-- 预加载关键资源 -->
    <link rel="preconnect" href="https://fonts.googleapis.com" />
    <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
    
    <title>RX在线教育平台</title>
    
    <!-- 移动端适配 -->
    <script>
      // 禁用双击缩放
      let lastTouchEnd = 0;
      document.addEventListener('touchend', function (event) {
        const now = (new Date()).getTime();
        if (now - lastTouchEnd <= 300) {
          event.preventDefault();
        }
        lastTouchEnd = now;
      }, false);
      
      // 禁用长按选择
      document.addEventListener('selectstart', function(e) {
        e.preventDefault();
      });
      
      // 设置根字体大小（rem适配）
      (function(doc, win) {
        const docEl = doc.documentElement;
        const resizeEvt = 'orientationchange' in window ? 'orientationchange' : 'resize';
        const recalc = function() {
          const clientWidth = docEl.clientWidth;
          if (!clientWidth) return;
          docEl.style.fontSize = 100 * (clientWidth / 375) + 'px';
        };
        if (!doc.addEventListener) return;
        win.addEventListener(resizeEvt, recalc, false);
        doc.addEventListener('DOMContentLoaded', recalc, false);
      })(document, window);
    </script>
    
    <!-- 加载动画样式 -->
    <style>
      #loading {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: #fff;
        display: flex;
        align-items: center;
        justify-content: center;
        z-index: 9999;
      }
      
      .loading-spinner {
        width: 40px;
        height: 40px;
        border: 3px solid #f3f3f3;
        border-top: 3px solid #1989fa;
        border-radius: 50%;
        animation: spin 1s linear infinite;
      }
      
      @keyframes spin {
        0% { transform: rotate(0deg); }
        100% { transform: rotate(360deg); }
      }
      
      .loading-text {
        margin-top: 16px;
        color: #666;
        font-size: 14px;
      }
    </style>
  </head>
  <body>
    <!-- 加载动画 -->
    <div id="loading">
      <div>
        <div class="loading-spinner"></div>
        <div class="loading-text">加载中...</div>
      </div>
    </div>
    
    <!-- Vue应用挂载点 -->
    <div id="app"></div>
    
    <!-- 移动端调试工具（仅开发环境） -->
    <script>
      if (process.env.NODE_ENV === 'development') {
        const script = document.createElement('script');
        script.src = 'https://unpkg.com/vconsole@latest/dist/vconsole.min.js';
        script.onload = function() {
          new VConsole();
        };
        document.head.appendChild(script);
      }
    </script>
    
    <script type="module" src="/src/main.js"></script>
  </body>
</html>